import request from "@/utils/request";


//获取员工简单列表
export function geteSmpleList() {
    return request({
        url: ' /sys/user/simple'
        
    })
}

//封装员工详细信息
export function getEmpList(params){
    return request({
        url: '/sys/user',
        params
    })
}

//删除员工
export function delEmp(id){
    return request({
        url: `/sys/user/${id}`,
        method:'delete'
    })
}
//添加员工
export function addEmp(data) {
    return request({
        url: '/sys/user',
        method: 'post',
        data
    })
}

//保存用户基本信息
export function saveProfile(data) {
    return request({
        url: `/sys/user/${data.id}`,
        method:'put',
        data
    })
}


//获取角色列表
export function setRoles(data) {
    return request({
        url: '/sys/user/assignRoles',
        method: "put",
        data
    })
}